<%@ Page Language="C#" Inherits="Castle.MonoRail.Views.AspView.ViewAtDesignTime<ICommentsView>" %>
<%@ Import namespace="KenEgozi.Com.Weblog.Interfaces"%>
<%@ Import namespace="Castle.MonoRail.Framework.Helpers"%>
<%@ Import namespace="KenEgozi.Com.Domain.Aggregates.Post"%>

<div class="new-comments">
	<%foreach (Comment comment in view.Comments) { %>
	<div class="new-comment">
		<div class="comment-info:">
			<label>Id: </label><span><%=comment.Id %></span><br />
			<label>Date: </label><span><%=comment.Lifecycle.CreationDate.ToString() %></span><br />
			<label>Name: </label><span><%=comment.Name%></span><br />
			<label>Homepage: </label><span><%=comment.Homepage%></span><br />
			<label>Email: </label>
			<span>
				<a href="mailto:<%=comment.Email %>"><%=comment.Email %></a>
			</span><br />
			<label>Actions: </label>
			<span class="action" onclick="deleteComment(<%=comment.Id %>);">Delete</span>
			&nbsp;
			<span class="action" onclick="approveComment(<%=comment.Id %>);">Approve</span>
			<br />
			<br />
		</div>
		<div class="comment-content">
			<%=comment.Content %>
		</div>
	</div>
	<%} %>
</div>
